3.354 \(\int \frac{(2 a-x) x}{a^3+x^3} \, dx\)

Optimal. Leaf size=29 \[ -\log (a+x)-\frac{2 \tan ^{-1}\left (\frac{a-2 x}{\sqrt{3} a}\right )}{\sqrt{3}} \]

[Out]

(-2*ArcTan[(a - 2*x)/(Sqrt[3]*a)])/Sqrt[3] - Log[a + x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0692421, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222 \[ -\log (a+x)-\frac{2 \tan ^{-1}\left (\frac{a-2 x}{\sqrt{3} a}\right )}{\sqrt{3}} \]

Antiderivative was successfully verified.

[In]  Int[((2*a - x)*x)/(a^3 + x^3),x]

[Out]

(-2*ArcTan[(a - 2*x)/(Sqrt[3]*a)])/Sqrt[3] - Log[a + x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 9.62086, size = 31, normalized size = 1.07 \[ - \log{\left (a + x \right )} - \frac{2 \sqrt{3} \operatorname{atan}{\left (\frac{\sqrt{3} \left (\frac{a}{3} - \frac{2 x}{3}\right )}{a} \right )}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((2*a-x)*x/(a**3+x**3),x)

[Out]

-log(a + x) - 2*sqrt(3)*atan(sqrt(3)*(a/3 - 2*x/3)/a)/3

_______________________________________________________________________________________

Mathematica [A]  time = 0.010361, size = 57, normalized size = 1.97 \[ \frac{1}{3} \left (-\log \left (a^3+x^3\right )+\log \left (a^2-a x+x^2\right )-2 \log (a+x)+2 \sqrt{3} \tan ^{-1}\left (\frac{2 x-a}{\sqrt{3} a}\right )\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[((2*a - x)*x)/(a^3 + x^3),x]

[Out]

(2*Sqrt[3]*ArcTan[(-a + 2*x)/(Sqrt[3]*a)] - 2*Log[a + x] + Log[a^2 - a*x + x^2]
- Log[a^3 + x^3])/3

_______________________________________________________________________________________

Maple [A]  time = 0.005, size = 29, normalized size = 1. \[ -\ln \left ( a+x \right ) +{\frac{2\,\sqrt{3}}{3}\arctan \left ({\frac{ \left ( 2\,x-a \right ) \sqrt{3}}{3\,a}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((2*a-x)*x/(a^3+x^3),x)

[Out]

-ln(a+x)+2/3*3^(1/2)*arctan(1/3*(2*x-a)/a*3^(1/2))

_______________________________________________________________________________________

Maxima [A]  time = 1.51933, size = 35, normalized size = 1.21 \[ \frac{2}{3} \, \sqrt{3} \arctan \left (-\frac{\sqrt{3}{\left (a - 2 \, x\right )}}{3 \, a}\right ) - \log \left (a + x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((2*a - x)*x/(a^3 + x^3),x, algorithm="maxima")

[Out]

2/3*sqrt(3)*arctan(-1/3*sqrt(3)*(a - 2*x)/a) - log(a + x)

_______________________________________________________________________________________

Fricas [A]  time = 0.248579, size = 41, normalized size = 1.41 \[ -\frac{1}{3} \, \sqrt{3}{\left (\sqrt{3} \log \left (a + x\right ) - 2 \, \arctan \left (-\frac{\sqrt{3}{\left (a - 2 \, x\right )}}{3 \, a}\right )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((2*a - x)*x/(a^3 + x^3),x, algorithm="fricas")

[Out]

-1/3*sqrt(3)*(sqrt(3)*log(a + x) - 2*arctan(-1/3*sqrt(3)*(a - 2*x)/a))

_______________________________________________________________________________________

Sympy [A]  time = 0.592532, size = 54, normalized size = 1.86 \[ - \log{\left (a + x \right )} - \frac{\sqrt{3} i \log{\left (- \frac{a}{2} - \frac{\sqrt{3} i a}{2} + x \right )}}{3} + \frac{\sqrt{3} i \log{\left (- \frac{a}{2} + \frac{\sqrt{3} i a}{2} + x \right )}}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((2*a-x)*x/(a**3+x**3),x)

[Out]

-log(a + x) - sqrt(3)*I*log(-a/2 - sqrt(3)*I*a/2 + x)/3 + sqrt(3)*I*log(-a/2 + s
qrt(3)*I*a/2 + x)/3

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.21233, size = 36, normalized size = 1.24 \[ \frac{2}{3} \, \sqrt{3} \arctan \left (-\frac{\sqrt{3}{\left (a - 2 \, x\right )}}{3 \, a}\right ) -{\rm ln}\left ({\left | a + x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((2*a - x)*x/(a^3 + x^3),x, algorithm="giac")

[Out]

2/3*sqrt(3)*arctan(-1/3*sqrt(3)*(a - 2*x)/a) - ln(abs(a + x))